//
//  LandmarkCell.swift
//  ChinaLandmark
//
//  Created by liy on 2025/2/9.
//

import SwiftUI

struct LandmarkCell: View {
  let landmark: Landmark

  var body: some View {
    HStack {
      Image(landmark.image)
        .resizable()
        .frame(width: 50, height: 50)
        .cornerRadius(10)

      Text(landmark.name)

      Spacer()

      if landmark.isFavorite {
        Image(systemName: "star.fill")
          .foregroundStyle(.yellow) //          .imageScale(.medium) //	图片大小可以使用				.font(.system(size: 200))
      }
    }
  }
}

#Preview {
  LandmarkCell(landmark: landmarks[2])
}
